package com.brayan.webapp.model.realestate;

import java.util.ArrayList;
import java.util.List;

import org.joda.time.DateTime;
import org.joda.time.Interval;
import org.joda.time.LocalDate;

public class SimpleEnrichedInterval {

	public SimpleEnrichedInterval(Interval displayInterval) {
		init(displayInterval);
	}

	// / DATA TO LOAD ///
	private List<LocalDate> calDays = new ArrayList<LocalDate>();

	/**
	 * Load the simple object data.
	 */
	public void init(Interval displayInterval) {
		DateTime startDate = displayInterval.getStart();
		DateTime endDate = displayInterval.getEnd();

		DateTime indexDate = startDate;

		while (indexDate.compareTo(endDate) < 0) {
			calDays.add(new LocalDate(indexDate));
			indexDate.plusDays(1);
		}
	}

}
